import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/Index'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/Index',
                    component: () => import(/* webpackChunkName: "Index" */ '../components/page/Index.vue'),
                    meta: { title: '系统首页' }
                },
                // {
                //     path: '/form',
                //     component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                //     meta: { title: '基本表单' }
                // },
                // {
                //     // 图片上传组件
                //     path: '/upload',
                //     component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                //     meta: { title: '文件上传' }
                // },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    // 组织页面
                   path: '/organization',
                   component: () => import(/* webpackChunkName: "organization" */ '../components/page/organization.vue'),
                   meta: { title: '组织管理' }
                },
                {
                    // 角色页面
                    path: '/UserRole',
                    component: () => import(/* webpackChunkName: "UserRole" */ '../components/page/UserRole.vue'),
                    meta: { title: '角色管理' }
                },
                {
                    // 人员管理页面
                    path: '/People',
                    component: () => import(/* webpackChunkName: "People" */ '../components/page/People.vue'),
                    meta: { title: '人员管理' }
                },
                {
                    // 人员需求页面
                    path: '/people_Demand',
                    component: () => import(/* webpackChunkName: "people_Demand" */ '../components/page/people_Demand.vue'),
                    meta: { title: '人员需求' }
                },
                {
                    // 人员转正页面
                    path: '/ordering',
                    component: () => import(/* webpackChunkName: "people_Regularization" */ '../components/page/ordering.vue'),
                    meta: { title: '人员订餐' }
                },
                {
                    // 权限管理页面
                    path: '/QuanXian',
                    component: () => import(/* webpackChunkName: "QuanXian" */ '../components/page/QuanXian.vue'),
                    meta: { title: '权限管理' }
                },
                {
                    // 请假申请页面
                    path: '/LeaveForm',
                    component: () => import(/* webpackChunkName: "LeaveForm" */ '../components/page/LeaveForm.vue'),
                    meta: { title: '请假申请' }
                },
                {
                    // 加班申请页面
                    path: '/overtime',
                    component: () => import(/* webpackChunkName: "overtime" */ '../components/page/overtime.vue'),
                    meta: { title: '加班申请' }
                },
                {
                    // 费用报销申请
                    path: '/Expense_reimbursement',
                    component: () => import(/* webpackChunkName: "Expense_reimbursement" */ '../components/page/Expense_reimbursement.vue'),
                    meta: { title: '费用报销申请' }
                },
                {
                    // 差旅报销申请
                    path: '/travel_on_business',
                    component: () => import(/* webpackChunkName: "travel_on_business" */ '../components/page/travel_on_business.vue'),
                    meta: { title: '差旅报销申请' }
                   
                },
                {
                    // 工作出差申请
                    path: '/business_trip',
                    component: () => import(/* webpackChunkName: "business_trip" */ '../components/page/business_trip.vue'),
                    meta: { title: '工作出差申请' }
                   
                },
                 {
                    // 工作汇报申请
                    path: '/work_report',
                    component: () => import(/* webpackChunkName: "work_report" */ '../components/page/work_report.vue'),
                    meta: { title: '工作汇报申请' }
                   
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
